package com.zpark.service.impl;

import com.zpark.mapper.IDeptMapper;
import com.zpark.pojo.Dept;
import com.zpark.service.IDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @PackageName: com.zpark.service.impl
 * @ClassName: DeptServiceImpl
 * @Description:
 * @author: RZS
 * @date: 2024/5/7  10:47
 */
@Service
public class DeptServiceImpl implements IDeptService {

    // 自动注入持久层对象
    @Resource
    private IDeptMapper deptMapper;

    @Override
    public Dept findById(Integer id) {
        return deptMapper.selectById(id);
    }

    @Override
    public List<Dept> findAll() {
        return deptMapper.selectList(null);
    }
}
